package com.changgou.system.exception;

import com.changgou.entity.Result;
import com.changgou.entity.StatusCode;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class GloableHandler {

    @ExceptionHandler(Exception.class)
    @ResponseBody
    public Result exceptionHandler(){
        return new Result(false, StatusCode.ERROR,"系统功能错误");
    }
}
